// stores/sidebar.ts
import { defineStore } from 'pinia'

export const useSidebarStore = defineStore('sidebar', {
  state: () => ({
    isExpanded: true, // 侧边栏展开状态
    isMobile: false   // 是否为移动设备
  }),
  actions: {
    toggleSidebar() {
      this.isExpanded = !this.isExpanded
    },
    setMobile(isMobile: boolean) {
      this.isMobile = isMobile
    }
  }
})